﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://Behemoth.com/Schemas/SharePoint/Data/Dsp" elementFormDefault="qualified" targetNamespace="http://Behemoth.com/Schemas/SharePoint/Data/Dsp" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="DataSourceProperties" type="tns:DataSourceControlProperties" />
  <xs:complexType name="DataSourceControlProperties">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" default="" name="AssemblyName" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" default="false" name="CancelSelectOnNullParameter" type="xs:boolean" />
      <xs:element minOccurs="0" maxOccurs="1" name="Authentication" type="tns:AuthenticationProperties" />
      <xs:element minOccurs="0" maxOccurs="1" name="SqlProperties" type="tns:SqlDataSourceProperties" />
      <xs:element minOccurs="0" maxOccurs="1" name="XmlProperties" type="tns:XmlDataSourceProperties" />
      <xs:element minOccurs="0" maxOccurs="1" name="WebProperties" type="tns:WebDataSourceProperties" />
      <xs:element minOccurs="0" maxOccurs="1" name="SharePointProperties" type="tns:SpDataSourceProperties" />
      <xs:element minOccurs="0" maxOccurs="1" default="" name="SelectCommand" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="SelectParameters" type="tns:ArrayOfParameter" />
      <xs:element minOccurs="0" maxOccurs="1" default="" name="InsertCommand" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="InsertParameters" type="tns:ArrayOfParameter" />
      <xs:element minOccurs="0" maxOccurs="1" default="" name="UpdateCommand" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="UpdateParameters" type="tns:ArrayOfParameter" />
      <xs:element minOccurs="0" maxOccurs="1" default="" name="DeleteCommand" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="DeleteParameters" type="tns:ArrayOfParameter" />
    </xs:sequence>
    <xs:attribute default="" name="ID" type="xs:string" />
    <xs:attribute default="" name="Name" type="xs:string" />
    <xs:attribute default="" name="AssemblyName" type="xs:string" />
    <xs:attribute default="" name="TypeName" type="xs:string" />
  </xs:complexType>
  <xs:complexType name="AuthenticationProperties">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" default="true" name="AllowIntegratedSecurity" type="xs:boolean" />
      <xs:element minOccurs="0" maxOccurs="1" default="" name="AuthType" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" default="" name="AuthUserName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" default="" name="AuthPassword" nillable="true" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="SqlDataSourceProperties">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" default="DataSet" name="DataSourceMode" type="tns:SqlDataSourceMode" />
      <xs:element minOccurs="0" maxOccurs="1" default="" name="ProviderName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" default="Text" name="SelectCommandType" type="tns:SqlDataSourceCommandType" />
      <xs:element minOccurs="0" maxOccurs="1" default="Text" name="InsertCommandType" type="tns:SqlDataSourceCommandType" />
      <xs:element minOccurs="0" maxOccurs="1" default="Text" name="UpdateCommandType" type="tns:SqlDataSourceCommandType" />
      <xs:element minOccurs="0" maxOccurs="1" default="Text" name="DeleteCommandType" type="tns:SqlDataSourceCommandType" />
      <xs:element minOccurs="0" maxOccurs="1" default="" name="SortParameterName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" default="" name="FilterExpression" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="FilterParameters" type="tns:ArrayOfParameter" />
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="SqlDataSourceMode">
    <xs:restriction base="xs:string">
      <xs:enumeration value="DataReader" />
      <xs:enumeration value="DataSet" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="SqlDataSourceCommandType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Text" />
      <xs:enumeration value="StoredProcedure" />
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ArrayOfParameter">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Parameter" nillable="true" type="tns:Parameter" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="Parameter">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="DefaultValue" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" default="Input" name="Direction" type="tns:ParameterDirection" />
      <xs:element minOccurs="0" maxOccurs="1" default="" name="Name" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" default="0" name="Size" type="xs:int" />
      <xs:element minOccurs="0" maxOccurs="1" default="Empty" name="Type" type="tns:TypeCode" />
      <xs:element minOccurs="0" maxOccurs="1" default="true" name="ConvertEmptyStringToNull" type="xs:boolean" />
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="ParameterDirection">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Input" />
      <xs:enumeration value="Output" />
      <xs:enumeration value="InputOutput" />
      <xs:enumeration value="ReturnValue" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TypeCode">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Empty" />
      <xs:enumeration value="Object" />
      <xs:enumeration value="DBNull" />
      <xs:enumeration value="Boolean" />
      <xs:enumeration value="Char" />
      <xs:enumeration value="SByte" />
      <xs:enumeration value="Byte" />
      <xs:enumeration value="Int16" />
      <xs:enumeration value="UInt16" />
      <xs:enumeration value="Int32" />
      <xs:enumeration value="UInt32" />
      <xs:enumeration value="Int64" />
      <xs:enumeration value="UInt64" />
      <xs:enumeration value="Single" />
      <xs:enumeration value="Double" />
      <xs:enumeration value="Decimal" />
      <xs:enumeration value="DateTime" />
      <xs:enumeration value="String" />
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="XmlDataSourceProperties">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" default="" name="Data" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" default="" name="Transform" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" default="" name="DataFile" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" default="" name="TransformFile" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" default="" name="XPath" nillable="true" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="WebDataSourceProperties">
    <xs:attribute default="GET" name="HttpMethod" type="xs:string" />
  </xs:complexType>
  <xs:complexType name="SpDataSourceProperties">
    <xs:attribute default="List" name="DataSourceMode" type="tns:SPDataSourceMode" />
    <xs:attribute default="Default" name="Scope" type="tns:SPViewScope" />
    <xs:attribute default="false" name="IncludeHidden" type="xs:boolean" />
    <xs:attribute default="false" name="UseInternalName" type="xs:boolean" />
  </xs:complexType>
  <xs:simpleType name="SPDataSourceMode">
    <xs:restriction base="xs:string">
      <xs:enumeration value="List" />
      <xs:enumeration value="ListOfLists" />
      <xs:enumeration value="CrossList" />
      <xs:enumeration value="Webs" />
      <xs:enumeration value="ListItem" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="SPViewScope">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Default" />
      <xs:enumeration value="Recursive" />
      <xs:enumeration value="RecursiveAll" />
      <xs:enumeration value="FilesOnly" />
    </xs:restriction>
  </xs:simpleType>
</xs:schema>